{% extends "common/frame.html" %}
{% load string %}
{% load i18n %} 
  
{% block head %}
  <title>
  {% if post %}
    {{ post.title|escape }}
  {% else %}
    {% if board %}{{ board.title|escape }} - {% endif %}{{ config.site_title }}
  {% endif %}
  </title>
  
  {% if board and not board.dummy %}
  <link href="{% url ytcommunity.forum.view.post.feed name=board.get_board_key %}" rel="alternate" type="application/rss+xml">
  {% else %}
  <link href="{% url ytcommunity.forum.view.post.feed %}" rel="alternate" type="application/rss+xml">
  {% endif %}

  {% block description %}
  {% endblock %}  
{% endblock %}

{% block header %}
<div id="header">
  <div id="logo">
    <h1><a href="/">{{ config.site_title }}<sup></sup></a></h1>
    <h2>{{ config.site_description }}</h2>
  </div>  
  <div id="menu">
    <ul>
    <li class="active"><a href="{% url ytcommunity.forum.view.board.list %}">{% trans "Homepage" %}</a></li>
    <li><a href="{% url ytcommunity.forum.view.post.all %}">{% trans "All Posts" %}</a></li>
    <li>  
        {% if user.user %}
        <a href="{{ user.url }}">{% trans "Logout" %}</a>  
        {% if user.admin %}<a href="{% url ytcommunity.forum.view.board.add %}">{% trans "Admin" %}</a>{% endif %}
		{% else %}
		<a href="{{ user.url }}">{% trans "Login" %}</a>
		{% endif %}
   	</li>
    </ul>
  </div>  
</div>
{% endblock %}

{% block page %}
<div id="page">
<div id="content">
  {% block content %}
  {% endblock %}
  <script type="text/javascript">
    dp.SyntaxHighlighter.ClipboardSwf = '/static/js/syntaxhighlighter/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
  </script> 
</div>
</div>
{% endblock %}
